<template>
  <p>我是子组件：{{ content }}</p>
  <p>{{ name }}</p>
  <button @click="add()">子按钮</button>
</template>
<script setup>
import { ref } from 'vue'
import { useStore } from "@/stotes/index";
import { storeToRefs } from 'pinia'
const store = useStore();
const { content, name } = storeToRefs(store)
const add = () => {
  store.content++
  store.changeName("sd")
}
</script>

